package cn.kk.communication.dao;
/*
 *@author KK on 2022.09.12 0:15
 */

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface Dao<T> {
    //考虑事务的通用dao
    public Object getValue(Connection conn, String sql, Object... params) throws SQLException;

    public List<T> queryAll(Connection conn, String sql, Object... params) throws SQLException;

    public T query(Connection conn, String sql, Object... params) throws SQLException;

    public int update(Connection conn, String sql, Object... params) throws SQLException;

    //不考虑事务的通用dao
    public Object getValue(String sql, Object... params) throws SQLException;

    public List<T> queryAll(String sql, Object... params) throws SQLException;

    public T query(String sql, Object... params) throws SQLException;

    public int update(String sql, Object... params) throws SQLException;
}
